package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 论坛主题
 * </p>
 *
 * @author zjn
 * @since 2021-12-07
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("o_conference_topic")
@ApiModel(value = "ConferenceTopic", description = "论坛主题")
@AllArgsConstructor
public class ConferenceTopic extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 会议日程主题名称
     */
    @ApiModelProperty(value = "会议日程主题名称")
    @Size(max = 32, message = "会议日程主题名称长度不能超过32")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "会议日程主题名称")
    private String name;

    /**
     * 会议日程主题英文名称
     */
    @ApiModelProperty(value = "会议日程主题英文名称")
    @Size(max = 32, message = "会议日程主题英文名称长度不能超过32")
    @TableField(value = "en_name", condition = LIKE)
    @Excel(name = "会议日程主题英文名称")
    private String enName;

    /**
     * 论坛地点
     */
    @ApiModelProperty(value = "论坛地点")
    @Size(max = 256, message = "论坛地点长度不能超过256")
    @TableField(value = "address", condition = LIKE)
    @Excel(name = "论坛地点")
    private String address;

    /**
     * 论坛英文地点
     */
    @ApiModelProperty(value = "论坛英文地点")
    @Size(max = 256, message = "论坛英文地点长度不能超过256")
    @TableField(value = "en_address", condition = LIKE)
    @Excel(name = "论坛英文地点")
    private String enAddress;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @TableField(value = "start_time")
    @Excel(name = "开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @TableField(value = "end_time")
    @Excel(name = "结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime endTime;

    /**
     * 会议语言
     */
    @ApiModelProperty(value = "会议语言")
    @Size(max = 8, message = "会议语言长度不能超过8")
    @TableField(value = "language_type", condition = LIKE)
    @Excel(name = "会议语言")
    private String languageType;

    /**
     * 主持人排序方式
     */
    @ApiModelProperty(value = "主持人排序方式")
    @Size(max = 32, message = "主持人排序方式长度不能超过32")
    @TableField(value = "host_order_type", condition = LIKE)
    @Excel(name = "主持人排序方式")
    private String hostOrderType;

    /**
     * 演讲者排序方式
     */
    @ApiModelProperty(value = "演讲者排序方式")
    @Size(max = 32, message = "演讲者排序方式长度不能超过32")
    @TableField(value = "speaker_order_type", condition = LIKE)
    @Excel(name = "演讲者排序方式")
    private String speakerOrderType;

    /**
     * 关联论坛id
     */
    @ApiModelProperty(value = "关联论坛id")
    @TableField(value = "relation_conference_id")
    @Excel(name = "关联论坛id")
    private Long relationConferenceId;

    /**
     * 关联直播id
     */
    @ApiModelProperty(value = "关联直播id")
    @TableField(value = "relation_live_id")
    @Excel(name = "关联直播id")
    private Long relationLiveId;

    /**
     * 关联会议id
     */
    @ApiModelProperty(value = "关联会议id")
    @TableField(value = "relation_meeting__id")
    @Excel(name = "关联会议id")
    private Long relationMeetingId;

    /**
     * 是否上架
     */
    @ApiModelProperty(value = "是否上架")
    @TableField(value = "is_shelves")
    @Excel(name = "是否上架")
    private Integer isShelves;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;


    @Builder
    public ConferenceTopic(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, String name, String enName, String address, String enAddress, 
                    LocalDateTime startTime, LocalDateTime endTime, String languageType, String hostOrderType, String speakerOrderType, Long relationConferenceId, 
                    Long relationLiveId, Long relationMeetingId, Integer isShelves, Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.name = name;
        this.enName = enName;
        this.address = address;
        this.enAddress = enAddress;
        this.startTime = startTime;
        this.endTime = endTime;
        this.languageType = languageType;
        this.hostOrderType = hostOrderType;
        this.speakerOrderType = speakerOrderType;
        this.relationConferenceId = relationConferenceId;
        this.relationLiveId = relationLiveId;
        this.relationMeetingId = relationMeetingId;
        this.isShelves = isShelves;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
